package com.kefu.exam.vo;

import javax.validation.constraints.Size;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractUpdateVo;
import com.kefu.exam.model.ExamSubject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author xy
 * @date 2022/02/28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "考题表")
public class ExamSubjectUpdateVo extends AbstractUpdateVo<ExamSubject,String> {

    @NotEmpty
    @ApiModelProperty(value = "主键")
    private String subjectId;
    @Size(max = 32)
    @ApiModelProperty(value = "分类")
    private String typeId;
    @Size(max = 200)
    @ApiModelProperty(value = "分类名")
    private String typeName;
    @ApiModelProperty(value = "考题状态")
    private Integer subjectStatus;

    @Override
    public ExamSubject convert() {
        ExamSubject info = new ExamSubject();
        info.setTypeId(typeId);
        info.setTypeName(typeName);
        info.setSubjectStatus(subjectStatus);
        KefuContext context = KefuContext.getKefuContext();
        info.setSubjectId(subjectId);
        return info;
	}
}